//引入react jsx写法的必须
import React from 'react';
//引入需要用到的页面组件
import Home from './pages/home';
import About from './pages/about';
import Designer from './pages/designer';
import Login from './base/login'
import MainContent from './base/main'
import EditReport from './views/editReport'
import EditReport_Grid from './views/editReport_Grid'

import ViewReport from './views/viewReport'
import DimManagement from './views/DimManagement'
import FormManagement from './views/formManagement'
import ViewForm from './views/ViewForm'
import TestDiv from './views/testDiv'
//引入一些模块
import { BrowserRouter as Router, Route,Switch} from "react-router-dom";

function router(){
    return <Router>
                <Switch>
                    <Route key="/home" path="/home"  component={Home} />
                    <Route key="/designer" path="/designer" component={Designer} />
                    <Route key="/about" path="/about" component={About} />
                    <Route key="/login" path="/login" component={Login} />
                    <Route key="/mainKey" path="/main" component={MainContent} />
                    {/*<Route key="/main2"  component={SiderDemo2} />*/}
                    <Route key="/eidtReport/id" path="/eidtReport/:id" component={EditReport} />
                    <Route key="/eidtReportGrid/id" path="/eidtReportGrid/:id" component={EditReport_Grid} />
                    <Route key="/viewReport/id"  path="/viewReport/:id/:accountSetId/:year/:month/:orgName/:reportDate/:reportNo/:lister/:auditor/:way/:reportInstanceId" component={ViewReport} />
                    {/*<Route path="/login" component={LoginForm} />*/}
                    <Route key="/dim" path="/dim" component={DimManagement} />
                    <Route key="/formManagement" path="/formManagement" component={FormManagement} />
                    <Route key="/viewForm/formId" path="/viewForm/:formId" component={ViewForm} />
                    <Route key="/testdiv" path="/testdiv" component={TestDiv} />
                </Switch>
            </Router>
}

export default router;
